import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home'
import User from '../views/User'
import Main from '../views/Main'
import Mall from '../views/Mall'
import pageOne from '../views/page1'
import pageTwo from '../views/page2'
import Login from '../views/Login'



Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Main,
    redirect:'/home',
    children:[
      {path: '/Home',component: Home},
      {path: '/User',component: User},
      {path: '/Mall',component: Mall},
      {path: '/page1',component: pageOne},
      {path: '/page2',component: pageTwo}
    ],
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  }
]

const router = new VueRouter({
  routes
})

export default router
